//
//  WYNetwork.h
//  WYNews
//
//  Created by dai.fengyi on 15/5/27.
//  Copyright (c) 2015年 childrenOurFuture. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#import "Singleton.h"
@interface WYNetwork : NSObject
single_interface(WYNetwork)
@property (strong, nonatomic) AFHTTPSessionManager *sessionManager;

@property (strong, nonatomic) AFNetworkReachabilityManager *reachabilityManager;

+ (void)startEngine;

- (void)HttpGet:(NSString *)URLString parameter:(id)parameters success:(void(^)(id responseObject))success failure:(void(^)(NSError *error))failure;
- (void)HttpGetWithNoMBProgress:(NSString *)URLString parameter:(id)parameters success:(void(^)(id responseObject))success failure:(void(^)(NSError *error))failure;
- (void)HttpPostWithNoMBProgress:(NSString *)URLString parameter:(id)parameters success:(void(^)(id responseObject))success failure:(void(^)(NSError *error))failure;
/**
 获取登录验证码
 */
- (NSString *) getIdentifyingCodeUrl;
/**
 登录
 */
- (void)postLogin:(NSString *)username password:(NSString *)password captcha:(NSString *)captcha success:(void (^)(id responseObject))success failure:(void (^)(NSString *error))failure;
/*
 获取商品列表 get
 */
- (void)getproductList:(NSInteger)pageIndex goodsName:(NSString *)goodsName success:(void (^)(id responseObject))success failure:(void (^)(NSString *error))failure;
/*
  新增意向单 获取商品属性 get
 */
- (void)goodsproperty:(NSString *)goodsId success:(void (^)(id responseObject))success failure:(void (^)(NSString *error))failure;
/*
 批量添加意向单意向
 */
- (void)postAddIntentionList:(NSArray *)listArray success:(void (^)(id responseObject))success failure:(void (^)(NSString *error))failure;
/**
结算方式列表 get baseinfo/clearingform/list
 */
- (void)getClearingformList:(void (^)(id responseObject))success failure:(void (^)(NSString *error))failure;
@end
